package com.tyk.bookstore.front.member.model.vo;


import com.tyk.bookstore.front.common.core.model.enume.Gender;
import com.tyk.bookstore.front.common.core.util.FileUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;


@Data
public class MemberVo {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "账号/会员名")
    private String account;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "昵称")
    private String nickname;

    @Schema(description = "头像路径")
    private String avatar;

    @Schema(description = "性别[0男，1女]")
    private Gender gender;

    @Schema(description = "身份证号")
    private String idCard;

    @Schema(description = "生日")
    private LocalDateTime birthday;

    @Schema(description = "账户余额")
    private BigDecimal amount;

    public MemberVo setAvatar(String avatar) {
        this.avatar = FileUtil.fullFilePath(avatar);
        return this;
    }
}
